/* 
 * Copyright [2018] [Alex/libo(liboware@gmail.com)]
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.hyts.infodb.error;

import com.hyts.infodb.enums.LayerTypeEnum;

/** 
 * @author LiBo/Alex
 * @see java.lang.RuntimeException
 * @version V1.0 
  *  系统基础异常类
 */
public class ApplicationException extends RuntimeException {

    /**  
     * <p>层次类型-异常层次</p> 
     * @fieldName layerTypeEnum
     * @fieldType LayerTypeEnum
     */ 
    private LayerTypeEnum layerTypeEnum;
    
    /**  
     * @fieldName serialVersionUID
     * @fieldType long
     */ 
    private static final long serialVersionUID = -4302193952059265111L;

    
    /**  
     * @constructor：InfoDBException    
     */ 
    public ApplicationException() {
        super();
        this.layerTypeEnum = LayerTypeEnum.FRAMEWORK;
    }

    /**  
     * @constructor：InfoDBException  
     * @param message
     * @param cause  
     */ 
    public ApplicationException(String message, Throwable cause) {
        super(message, cause);
        this.layerTypeEnum = LayerTypeEnum.FRAMEWORK;
    }

    /**  
     * @constructor：InfoDBException  
     * @param message  
     */ 
    public ApplicationException(String message) {
        super(message);
        this.layerTypeEnum = LayerTypeEnum.FRAMEWORK;
    }

    /**  
     * @constructor：InfoDBException  
     * @param cause  
     */ 
    public ApplicationException(Throwable cause) {
        super(cause);
        this.layerTypeEnum = LayerTypeEnum.FRAMEWORK;
    }

    /**  
     * @name layerTypeEnum's getter method
     * @param none
     * @return layerTypeEnum
     */
    public LayerTypeEnum getLayerTypeEnum() {
        return layerTypeEnum;
    }

    /**  
     * @name layerTypeEnum's setter method
     * @param layerTypeEnum
     * @return void
     */
    protected void setLayerTypeEnum(LayerTypeEnum layerTypeEnum) {
        this.layerTypeEnum = layerTypeEnum;
    }
    
}
